import React from 'react';
import { Link, Popup } from 'tdesign-react';
import styles from '../../index.module.less';

interface DirectLinkProps {
  content: string;
  href: string;
  image: string;
  alt: string;
}

const DirectLink: React.FC<DirectLinkProps> = ({ content, href, image, alt }) => {
  return (
    <Popup content={content} trigger="hover">
      <Link className={styles.toOther} hover='color' href={href}>
        <img src={image} alt={alt} />
      </Link>
    </Popup>
  );
};

export default DirectLink;